package com.iplant.ams.serviceImpl.dao.dms.scada;

import com.iplant.ams.service.po.dms.scada.alarm.DMSDeviceCurrentAlarm;
import com.iplant.ams.service.po.dms.scada.alarm.DMSDeviceHisAlarm;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@DBBaseDAO(DMSDeviceCurrentAlarm.class)
@Slf4j
public class DMSDeviceCurrentAlarmDAO extends BaseDAO {

    private static DMSDeviceCurrentAlarmDAO Instance = null;

    public static DMSDeviceCurrentAlarmDAO getInstance() {
        if (Instance == null) {
            Instance = new DMSDeviceCurrentAlarmDAO();
        }
        return Instance;
    }

    public DMSDeviceCurrentAlarmDAO() {
        super("");this.Init();
    }
    public List<DMSDeviceCurrentAlarm> DMS_SelectDeviceCurrentAlarmList(BMSEmployee wLoginUser,
                          List<String> wAssetNoList,  String wAlarmCode,int wDataGrad,int wPositionID,
                                    Calendar wStartTime, Calendar wEndTime, Pagination wPagination, OutResult<Integer> wErrorCode){
        Map<String,Object> wParams= new HashMap<>();
        wParams.put("AssetNo", wAssetNoList);
        wParams.put("AlarmCode", wAlarmCode);
        wParams.put("PositionID", wPositionID);
        wParams.put("DataGrad", wDataGrad);
        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams , wPagination, wErrorCode);
    }



}
